﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Json;
using System.Text;

namespace ISAMonitor.DNSPODAPI
{
    /*
     * JSON
{
    "status": {
        "code": "1",
        "message": "Get record list success.",
        "created_at": "2008-11-25 21:18:26"
    },
    "records": {
        "record": [
            {
                "id": "419613",
                "name": "test",
                "line": "2",
                "type": "2",
                "ttl": "3600",
                "value": "www.dnspod.com.",
                "mx": "0",
                "enabled": "1",
                "updated_on": "2008-11-25 21:16:04"
            },
            {
                "id": "419614",
                "name": "test1815321701",
                "line": "1",
                "type": "1",
                "ttl": "3600",
                "value": "127.0.0.1",
                "mx": "0",
                "enabled": "1",
                "updated_on": "2008-11-25 21:18:26"
            }
        ]
    }
}*/
    [DataContract]
    public class RecordListRet
    {
        [DataMember(Order=0)]
        public status status { get; set; }
        [DataMember(Order=1)]
        public records records { get; set; }
    }

    [DataContract]
    public class records
    {
        [DataMember]
        public IList<record> record;
    }

    [DataContract]
    public class record
    {
        [DataMember(Order = 0)]
        public string id { get; set; }
        [DataMember(Order = 1)]
        public string name { get; set; }
        [DataMember(Order = 2)]
        public string line { get; set; }
        [DataMember(Order = 3)]
        public string type { get; set; }
        [DataMember(Order = 4)]
        public string ttl { get; set; }
        [DataMember(Order = 5)]
        public string value { get; set; }
        [DataMember(Order = 6)]
        public string mx { get; set; }
        [DataMember(Order = 7)]
        public string enabled { get; set; }
        [DataMember(Order = 8)]
        public string updated_on { get; set; }
    }
}
